package com.nmsl.controller;

import com.nmsl.domain.GyfSysUser;
import com.nmsl.mapper.GyfSysUserMapper;
import com.nmsl.util.R.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/su")
@RestController
public class GyfSysUserController {
    @Autowired
    private GyfSysUserMapper gyfSysUserMapper;

    //通过患者id查询这个患者的信息
    @GetMapping("/selectinfo")
    public R selectInfo(int id){
        GyfSysUser gyfSysUser = gyfSysUserMapper.selectInfoById(id);
        if(gyfSysUser != null){
            return R.ok(gyfSysUser);
        }else{
            return R.fail("查不到信息");
        }
    }
}
